import React from 'react';
import {Button, Menu, Pagination} from "antd";
import {FolderAddOutlined} from "@ant-design/icons";
import Sider from "antd/es/layout/Sider";

function TaskSuiteEditSider(props) {
    const {data,AddSuite,ChangeTestCase,total,page,ChangePage} = props
    return (
        <Sider className="site-layout-background" width={400}
               style={
                   {
                       overflow: 'auto',
                       height: '75vh',
                   }
               }>
            <Button block type={"text"} onClick={AddSuite()}><FolderAddOutlined/>添加测试套件</Button>
            <Menu
                mode="inline"
                items={data}
                onClick={e=>ChangeTestCase(e)}
            />
            <Pagination
                current={page.current}
                onChange={(e) => {ChangePage(e)}} responsive size={"small"} showSizeChanger={false}
                style={{textAlign: "center", marginBottom: "10px"}} total={total}/>
        </Sider>
    );
}

export default TaskSuiteEditSider;